<!-- ================== BEGIN PAGE LEVEL STYLE ================== -->
<link href="/assets/plugins/jquery-treegrid/css/jquery.treegrid.css" rel="stylesheet"/>
<link rel="stylesheet" href="/assets/plugins/zTree/css/metroStyle/metroStyle.css" type="text/css">
<!-- ================== END PAGE LEVEL STYLE ================== -->
<!-- begin #content -->
<div id="content" class="content">
    <!-- begin breadcrumb -->
    <ol class="breadcrumb pull-right">
        <li><a href="javascript:;">首页</a></li>
        <li><a href="javascript:;">资源管理</a></li>
        <li class="active">资源列表</li>
    </ol>
    <!-- end breadcrumb -->
    <!-- begin page-header -->
    <h1 class="page-header">资源管理</h1>
    <!-- end page-header -->

    <div class="panel panel-success">
        <div class="panel-heading">
            <div class="panel-heading-btn">
                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
            </div>
            <h4 class="panel-title">资源列表</h4>
        </div>
        <div class="p-l-15 p-t-15">
            <a href="javascript:resEdit(0);" class="btn btn-sm btn-white"><i class="fa fa-plus m-r-5"></i> 新增</a>
        </div>
        <div class="panel-body">
            <table class="table table-striped table-bordered table-hover table-checkable order-column tree" id="me_1">
                <thead>
                <tr>
                    <th style="text-align:left;padding:8px;width:300px">资源名称</th>
                    <th>资源路径</th>
                    <th>排序</th>
                    <th>图标</th>
                    <th>资源类型</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <#if resList??>
                    <#list resList as res>
                    <tr class="treegrid-${res.id?c} <#if (res.pid)??>treegrid-parent-${res.pid?c}</#if> odd gradeX">
                        <td style="text-align:left;padding:8px"> <i class="${(res.icon)!}"></i> ${(res.name)!}</td>
                        <td>${(res.url)!}</td>
                        <td>${(res.seq)!}</td>
                        <td>${(res.icon)!}</td>
                        <td><#if res.resourceType==0>菜单<#else>按钮</#if></td>
                        <td><span onclick="resEdit('${res.id?c}')" class="label label-success cursoP">修改</span> <span onclick="resDel('${res.id?c}')" class="label label-danger cursoP">删除</span></td>
                    </tr>
                    </#list>
                </#if>
                </tbody>
            </table>
        </div>
    </div>
</div>
<!-- end #content -->

<!-- ================== BEGIN PAGE LEVEL JS ================== -->
<#--treegrid-->
<script type="text/javascript" src="/assets/plugins/jquery-treegrid/js/jquery.treegrid.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/assets/plugins/jquery-treegrid/js/jquery.treegrid.bootstrap3.js" charset="utf-8"></script>
<!-- zTree -->
<script type="text/javascript" src="/assets/plugins/zTree/js/jquery.ztree.core.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/assets/plugins/zTree/js/jquery.ztree.excheck.min.js" charset="utf-8"></script>

<script>
    App.restartGlobalFunction();
    App.setPageTitle('资源管理 | 社区管理综合服务平台');
    $.getScript('/js/system/sysResource.js').done(function () {
        SysResource.init();
    });
</script>
<!-- ================== END PAGE LEVEL JS ================== -->